package com.gym.controller;

import com.gym.client.CourseClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RequestMapping("/course-consumer")
@RestController
public class CourseController {

    @Resource
    private CourseClient courseClient;


    /**
     * 根据教练id删除课程
     * @param coachId 教练id
     * @return
     */
    @RequestMapping("/delCourseByCoachId")
    public boolean delCourseByCoachId(@RequestParam int coachId){
        System.err.println("课程消费者:coachId"+coachId);
        return courseClient.delCourseByCoachId(coachId);
    }



}
